<template>
  <div class="dashboard-editor-container">
    <el-row style="width: 86.3%; top: 6px; z-index: 999; position: fixed">
      <el-col :span="20" class="card-box">
        <!-- <el-cascader
          class="region"
          v-model="brandList"
          placeholder="选择店铺分组"
          :options="cascadeList"
          :props="{ checkStrictly: true }"
          @change="handleChange"
          style="width: 350px; height: 30px"
        >
        </el-cascader> -->
        <el-select v-model="brandList" multiple placeholder="选择品牌" filterable style="width: 300px" size="mini">
          <el-option v-for="dict in dict.type.sys_product_pp" :key="dict.value" :label="dict.label" :value="dict.label" />
        </el-select>
      </el-col>

      <el-col :span="4">
        <el-radio-group v-model="dateType" size="small" v-show="activeName != 0">
          <el-radio-button v-for="(item, index) in typeArr" :key="index" :label="item.value">{{ item.label
          }}</el-radio-button>
        </el-radio-group>
      </el-col>
    </el-row>

    <el-tabs v-model="activeName" @tab-click="handleClick" type="border-card">
      <el-tab-pane label="近期概况" name="0">
        <section id="section1">
          <el-row :gutter="10" class="mb8" style="margin-bottom: 16px">
            <el-col :span="8">
              <el-card>
                <div slot="header">
                  <span><i class="el-icon-pie-chart"></i>
                    {{ query.brandList + " " }}MTD销售额</span>
                </div>

                <div class="el-table el-table--enable-row-hover el-table--medium">
                  <table cellspacing="0" style="width: 100%">
                    <tbody>
                      <tr>
                        <td class="el-table__cell is-leaf">
                          <div class="cell" style="font-weight: bold">汇总</div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell" style="font-weight: bold">
                            {{ twoFixed(itemData.monthlySales) }}万
                          </div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">环比</div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">
                            {{ itemData.monthlySalesChain }}%
                          </div>
                        </td>
                      </tr>
                      <tr>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">自营</div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">
                            {{ twoFixed(itemData.monthlySelfOperatedSales) }}万
                          </div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">占比</div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">
                            {{ itemData.monthlySelfOperatedSalesRatio }}%
                          </div>
                        </td>
                      </tr>
                      <tr>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">合作</div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">
                            {{ twoFixed(itemData.monthlyInfluencerSales) }}万
                          </div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">占比</div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">
                            {{ itemData.monthlyInfluencerSalesRatio }}%
                          </div>
                        </td>
                      </tr>
                    </tbody>
                  </table>
                </div>

                <!-- <div style="width: 270px; margin: 0 auto">
                  <div class="flex">
                    <span style="font-weight: bold; font-size: 18px">
                      汇总：
                      <count-to
                        :start-val="0"
                        :end-val="itemData.monthlySales"
                        :duration="duration"
                        :decimals="decimals"
                      />
                      万
                    </span>

                    <span class="spanflex" style="font-size: 14px">
                      <span>环比：</span>
                      <span> {{ itemData.monthlySalesChain }}%</span>
                    </span>
                  </div>
                  <div class="flex">
                    <span style="font-size: 16px">
                      自营:
                      <span>
                        <count-to
                          :start-val="0"
                          :end-val="itemData.monthlySelfOperatedSales"
                          :duration="duration"
                          :decimals="decimals"
                        />
                        万</span
                      >
                    </span>
                    <span class="spanflex" style="font-size: 14px">
                      <span>占比：</span>
                      <span>
                        {{ itemData.monthlySelfOperatedSalesRatio }}%</span
                      >
                    </span>
                  </div>
                  <div class="flex">
                    <span style="font-size: 16px">
                      合作:
                      <count-to
                        :start-val="0"
                        :end-val="itemData.monthlyInfluencerSales"
                        :duration="duration"
                        :decimals="decimals"
                      />
                      万
                    </span>
                    <span class="spanflex" style="font-size: 14px">
                      <span> 占比：</span>
                      <span>
                        {{ itemData.monthlyInfluencerSalesRatio }}%</span
                      ></span
                    >
                  </div>
                </div> -->

                <card :id="'monthly'" :chartData="echartDatamonthly" height="205px" width="509px"
                  style="display: inline-block; position: relative" />

                <div class="content">
                  <progressMonthly :progressValue="itemData.monthlyProgress" />
                </div>
              </el-card>
            </el-col>
            <el-col :span="8">
              <el-card>
                <div slot="header">
                  <span><i class="el-icon-collection"></i>{{ query.brandList + " " }} QTD销售额</span>
                </div>

                <div class="el-table el-table--enable-row-hover el-table--medium">
                  <table cellspacing="0" style="width: 100%">
                    <!-- <thead>
                      <tr>
                        <th class="el-table__cell is-leaf">
                          <div class="cell">类型</div>
                        </th>
                        <th class="el-table__cell is-leaf">
                          <div class="cell">销售金额</div>
                        </th>
                        <th class="el-table__cell is-leaf">
                          <div class="cell"></div>
                        </th>
                      </tr>
                    </thead> -->
                    <tbody>
                      <tr>
                        <td class="el-table__cell is-leaf">
                          <div class="cell" style="font-weight: bold">汇总</div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell" style="font-weight: bold">
                            {{ twoFixed(itemData.quarterlySales) }}万
                          </div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">环比</div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">
                            {{ itemData.quarterlySalesChain }}%
                          </div>
                        </td>
                      </tr>
                      <tr>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">自营</div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">
                            {{
                              twoFixed(itemData.quarterlySelfOperatedSales)
                            }}万
                          </div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">占比</div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">
                            {{ itemData.quarterlySelfOperatedSalesRatio }}%
                          </div>
                        </td>
                      </tr>
                      <tr>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">合作</div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">
                            {{ twoFixed(itemData.quarterlyInfluencerSales) }}万
                          </div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">占比</div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">
                            {{ itemData.quarterlyInfluencerSalesRatio }}%
                          </div>
                        </td>
                      </tr>
                    </tbody>
                  </table>
                </div>
                <!-- <div style="width: 270px; margin: 0 auto">
                  <div class="flex">
                    <span style="font-weight: bold; font-size: 18px">
                      汇总：
                      <count-to
                        :start-val="0"
                        :end-val="itemData.quarterlySales"
                        :duration="duration"
                        :decimals="decimals"
                      />
                      万
                    </span>

                    <span class="spanflex" style="font-size: 14px">
                      <span>环比：</span>
                      <span> {{ itemData.quarterlySalesChain }}%</span>
                    </span>
                  </div>
                  <div class="flex">
                    <span style="font-size: 16px">
                      自营:
                      <span>
                        <count-to
                          :start-val="0"
                          :end-val="itemData.quarterlySelfOperatedSales"
                          :duration="duration"
                          :decimals="decimals"
                        />
                        万</span
                      >
                    </span>
                    <span class="spanflex" style="font-size: 14px">
                      <span>占比：</span>
                      <span>
                        {{ itemData.quarterlySelfOperatedSalesRatio }}%</span
                      >
                    </span>
                  </div>
                  <div class="flex">
                    <span style="font-size: 16px">
                      合作:
                      <count-to
                        :start-val="0"
                        :end-val="itemData.quarterlyInfluencerSales"
                        :duration="duration"
                        :decimals="decimals"
                      />
                      万
                    </span>
                    <span class="spanflex" style="font-size: 14px">
                      <span> 占比：</span>
                      <span>
                        {{ itemData.quarterlyInfluencerSalesRatio }}%</span
                      ></span
                    >
                  </div>
                </div> -->

                <card :id="'quarterly'" :chartData="echartDataquarterly" height="205px" width="509px"
                  style="display: inline-block; position: relative" />

                <div class="content">
                  <progressYear :progressValue="itemData.quarterlyProgress" />
                </div>
              </el-card>
            </el-col>
            <el-col :span="8">
              <el-card>
                <div slot="header">
                  <span><i class="el-icon-collection"></i>
                    {{ query.brandList + " " }}YTD销售额
                  </span>
                </div>

                <div class="el-table el-table--enable-row-hover el-table--medium">
                  <table cellspacing="0" style="width: 100%">
                    <!-- <thead>
                      <tr>
                        <th class="el-table__cell is-leaf">
                          <div class="cell">类型</div>
                        </th>
                        <th class="el-table__cell is-leaf">
                          <div class="cell">销售金额</div>
                        </th>
                        <th class="el-table__cell is-leaf">
                          <div class="cell"></div>
                        </th>
                      </tr>
                    </thead> -->
                    <tbody>
                      <tr>
                        <td class="el-table__cell is-leaf">
                          <div class="cell" style="font-weight: bold">汇总</div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell" style="font-weight: bold">
                            {{ twoFixed(itemData.yearSales) }}万
                          </div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">环比</div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">{{ itemData.yearSalesChain }}%</div>
                        </td>
                      </tr>
                      <tr>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">自营</div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">
                            {{ twoFixed(itemData.yearSelfOperatedSales) }}万
                          </div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">占比</div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">
                            {{ itemData.yearSelfOperatedSalesRatio }}%
                          </div>
                        </td>
                      </tr>
                      <tr>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">合作</div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">
                            {{ twoFixed(itemData.yearInfluencerSales) }}万
                          </div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">占比</div>
                        </td>
                        <td class="el-table__cell is-leaf">
                          <div class="cell">
                            {{ itemData.yearInfluencerSalesRatio }}%
                          </div>
                        </td>
                      </tr>
                    </tbody>
                  </table>
                </div>
                <!-- <div style="width: 270px; margin: 0 auto">
                  <div class="flex">
                    <span style="font-weight: bold; font-size: 18px">
                      汇总：
                      <count-to
                        :start-val="0"
                        :end-val="itemData.yearSales"
                        :duration="duration"
                        :decimals="decimals"
                      />
                      万
                    </span>

                    <span class="spanflex" style="font-size: 14px">
                      <span>环比：</span>
                      <span> {{ itemData.yearSalesChain }}%</span>
                    </span>
                  </div>
                  <div class="flex">
                    <span style="font-size: 16px">
                      自营:
                      <span>
                        <count-to
                          :start-val="0"
                          :end-val="itemData.yearSelfOperatedSales"
                          :duration="duration"
                          :decimals="decimals"
                        />
                        万</span
                      >
                    </span>
                    <span class="spanflex" style="font-size: 14px">
                      <span>占比：</span>
                      <span> {{ itemData.yearSelfOperatedSalesRatio }}%</span>
                    </span>
                  </div>
                  <div class="flex">
                    <span style="font-size: 16px">
                      合作:
                      <count-to
                        :start-val="0"
                        :end-val="itemData.yearInfluencerSales"
                        :duration="duration"
                        :decimals="decimals"
                      />
                      万
                    </span>
                    <span class="spanflex" style="font-size: 14px">
                      <span> 占比：</span>
                      <span>
                        {{ itemData.yearInfluencerSalesRatio }}%</span
                      ></span
                    >
                  </div>
                </div> -->

                <card :id="'year'" :chartData="echartData" height="205px" width="509px"
                  style="display: inline-block; position: relative" />

                <div class="content">
                  <progressYear :progressValue="itemData.yearProgress" />
                </div>
              </el-card>
            </el-col>
          </el-row>
        </section>

        <section id="section2">
          <el-row :gutter="10" style="margin-bottom: 16px">
            <el-col :span="6">
              <el-card>
                <div slot="header">
                  <span><i class="el-icon-collection"></i>
                    {{ query.brandList + " " }}昨日概况</span>
                </div>

                <div class="nomargin">昨日销售额</div>
                <div class="content" style="font-weight: bold; font-size: 20px">
                  <count-to :start-val="0" :end-val="dateList.saleAmount" :duration="duration" :decimals="decimals" />万
                </div>
                <div class="content" style="font-size: 14px">
                  同比：{{ dateList.saleAmountYoy }}%
                </div>
                <div class="content" style="font-size: 14px">
                  环比：{{ dateList.saleAmountChain }}%
                </div>
                <div class="content" style="margin: 10px 0">
                  <progressDy :progressValue="dateList.targetCompletionRate" />
                </div>
                <div class="content">
                  销售目标：
                  <count-to :start-val="0" :end-val="dateList.salesTarget" :duration="duration" :decimals="decimals" />万
                  <!-- 预计达成：{{ dateList.selfSalesTarget }} -->
                </div>
                <div class="nomargin">
                  总店铺运营数：{{ dateList.shopCount }}家
                </div>
              </el-card>
            </el-col>
            <el-col :span="18">
              <el-card>
                <panel-group-date @handleSetLineChartData="handleSetLineChartData" :biNumberItem="dateList" />
              </el-card>
            </el-col>
          </el-row>
        </section>

        <section id="section3">
          <el-row :gutter="10" style="margin-bottom: 16px">
            <el-col :span="6">
              <el-card>
                <div slot="header">
                  <span><i class="el-icon-collection"></i>
                    {{ query.brandList + " " }}本周概况</span>
                </div>

                <div class="nomargin">本周销售额</div>
                <div class="content" style="font-weight: bold; font-size: 20px">
                  <count-to :start-val="0" :end-val="weekList.saleAmount" :duration="duration" :decimals="decimals" />
                  万
                </div>
                <div class="content" style="font-size: 14px">
                  同比：{{ weekList.saleAmountYoy }}%
                </div>
                <div class="content" style="font-size: 14px">
                  环比：{{ weekList.saleAmountChain }}%
                </div>
                <div class="content" style="margin: 10px 0">
                  <progressDy :progressValue="weekList.targetCompletionRate" />
                </div>
                <div class="content">
                  销售目标：
                  <count-to :start-val="0" :end-val="weekList.salesTarget" :duration="duration" :decimals="decimals" />
                  <!-- 预计达成：{{ weekList.selfSalesTarget }} -->
                  万
                </div>
                <div class="nomargin">
                  总店铺运营数：{{ weekList.shopCount }}家
                </div>
              </el-card>
            </el-col>
            <el-col :span="18">
              <el-card>
                <panel-group-week @handleSetLineChartData="handleSetLineChartData" :biNumberItem="weekList" />
              </el-card>
            </el-col>
          </el-row>
        </section>

        <!-- <section id="section13">
          <el-card>
            <div slot="header">
              <span
                ><i class="el-icon-collection"></i>
                {{ query.brandList + " " }}经营概况</span
              >
            </div>
            <panel-group :biNumberItem="biNumberItem" />
          </el-card>
        </section>

        <section id="section14" style="margin-top: 16px">
          <el-card>
            <div slot="header">
              <span
                ><i class="el-icon-collection"></i>
                {{ query.brandList + " " }}人群资产</span
              >
            </div>

            <el-card>
              <KoiCardI :itemData="SaleTypedata" />
            </el-card>
            <el-card>
              <KoiCardII :itemData="SaleTypedata" />
            </el-card>
          </el-card>

          <el-card>
            <div slot="header">
              <span
                ><i class="el-icon-collection"></i>
                {{ query.brandList + " " }}阵营宽度</span
              >
            </div>
            <el-card>
              <KoiCardIII :itemData="SaleTypedata" />
            </el-card>

            <el-card>
              <KoiCardIV :itemData="SaleTypedata" />
            </el-card>
          </el-card>
        </section>

        <section id="section4">
          <el-row :gutter="10" style="padding: 16px 0">
            <el-col :span="24">
              <el-card>
                <div
                  slot="header"
                  class="card-box"
                  style="display: flex; justify-content: space-between"
                >
                  <span
                    ><i class="el-icon-collection"></i>
                    {{ brandList.join(" ") + " " }}GMV达成趋势</span
                  >

                  <el-radio-group
                    v-model="labelType"
                    size="small"
                    @change="getselectGMVReachTrend"
                  >
                    <el-radio-button
                      v-for="(item, index) in typeDy"
                      :key="index"
                      :label="item.value"
                      >{{ item.label }}</el-radio-button
                    >
                  </el-radio-group>
                </div>

                <div
                  class="el-table el-table--enable-row-hover el-table--medium chart-container"
                >
                  <MinChart
                    :id="'echartDataMin'"
                    :minchartData="echartDataMin"
                    height="450px"
                    width="100%"
                    @SetLineChartData="SetLineChartData"
                  />
                </div>
              </el-card>
            </el-col>
          </el-row>
        </section>

        <section id="section5">
          <el-row :gutter="10" style="background: #fff; margin-bottom: 16px">
            <el-col :span="12">
              <el-card>
                <div
                  slot="header"
                  class="card-box"
                  style="display: flex; justify-content: space-between"
                >
                  <span>
                    <i class="el-icon-s-data" style="margin-right: 5px" />{{
                      brandList.join(" ") + " "
                    }}成交占比
                  </span>
                </div>
                <div
                  style="margin-left: 2px; margin-right: 2px; height: 400px"
                  id="echartsAll"
                ></div>
              </el-card>
            </el-col>
            <el-col :span="12">
              <el-card>
                <div
                  slot="header"
                  class="card-box"
                  style="display: flex; justify-content: space-between"
                >
                  <span>
                    <i class="el-icon-s-data" style="margin-right: 5px" />{{
                      brandList.join(" ") + " "
                    }}成交趋势
                  </span>
                </div>
                <chartData :echartDataSku="barChartData"></chartData>
              </el-card>
            </el-col>
          </el-row>
        </section> -->
      </el-tab-pane>
      <!-- <el-tab-pane label="店铺自营分析" name="1"> -->
      <!-- <section v-if="activeName == 1">
          <el-row style="background: #fff; margin-bottom: 16px">
            <el-card>
              <div
                slot="header"
                class="card-box"
                style="display: flex; justify-content: space-between"
              >
                <span>
                  <i class="el-icon-s-data" style="margin-right: 5px" />{{
                    brandList.join(" ") + " "
                  }}店铺直播对比分析
                </span>
                <el-select
                  v-model="propertyType"
                  placeholder="属性"
                  filterable
                  @change="getselectShopSelfOperate"
                >
                  <el-option
                    v-for="item in itemType"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select>
              </div>
              <div
                style="margin-left: 2px; margin-right: 2px; height: 460px"
                ref="echarts"
              ></div>
            </el-card>
          </el-row>

          <section>
            <el-row style="background: #fff; margin-bottom: 16px">
              <el-card>
                <div
                  slot="header"
                  class="card-box"
                  style="display: flex; justify-content: space-between"
                >
                  <span>
                    <i class="el-icon-s-data" style="margin-right: 5px" />{{
                      brandList.join(" ") + " "
                    }}店铺直播对比分析
                  </span>
                </div>
                <MergeTable :processData="selfOperatedList" />
              </el-card>
            </el-row>
          </section>

          <section id="section12">
            <el-row :gutter="10" style="padding: 16px 0">
              <el-col :span="12">
                <el-card>
                  <div
                    slot="header"
                    class="card-box"
                    style="display: flex; justify-content: space-between"
                  >
                    <span
                      ><i class="el-icon-collection"></i>
                      {{ brandList.join(" ") + " " }}直播转化漏斗</span
                    >
                  </div>
                  <funnelDate
                    :chartData="funnelroomList"
                    :id="'funnelroomList'"
                  />
                </el-card>
              </el-col>
              <el-col :span="12">
                <el-card>
                  <div
                    slot="header"
                    class="card-box"
                    style="display: flex; justify-content: space-between"
                  >
                    <span
                      ><i class="el-icon-collection"></i>
                      {{ brandList.join(" ") + " " }}商品转化分析</span
                    >
                  </div>

                  <funnelDate
                    :id="'funnelProductList'"
                    :chartData="funnelProductList"
                  />
                </el-card>
              </el-col>
            </el-row>
          </section>

          <section>
            <el-row style="background: #fff; margin-bottom: 16px">
              <el-card>
                <div
                  slot="header"
                  class="card-box"
                  style="display: flex; justify-content: space-between"
                >
                  <span>
                    <i class="el-icon-s-data" style="margin-right: 5px" />{{
                      brandList.join(" ") + " "
                    }}直播转化明细表
                  </span>
                </div>
                <liveTable :processData="liveOperatedList" />
              </el-card>
            </el-row>
          </section>

          <section>
            <el-row style="background: #fff; margin-bottom: 16px">
              <el-card>
                <div
                  slot="header"
                  class="card-box"
                  style="display: flex; justify-content: space-between"
                >
                  <span>
                    <i class="el-icon-s-data" style="margin-right: 5px" />{{
                      brandList.join(" ") + " "
                    }}直播转化趋势
                  </span>
                </div>
                <chartDataRate :echartDataSku="liveDataList" />
              </el-card>
            </el-row>
          </section>

          <section id="section4">
            <el-row :gutter="10" style="padding: 16px 0">
              <el-col :span="24">
                <el-row :gutter="10">
                  <el-col :span="6">
                    <el-card>
                      <div
                        slot="header"
                        class="card-box"
                        style="display: flex; justify-content: space-between"
                      >
                        <span
                          ><i class="el-icon-collection"></i>
                          {{ brandList.join(" ") + " " }}流量结构分类</span
                        >
                      </div>
                      <PieChart
                        :id="'PieChart'"
                        height="410px"
                        :chartData="PieChartData"
                      />
                    </el-card>
                  </el-col>
                  <el-col :span="18">
                    <el-card>
                      <div
                        slot="header"
                        class="card-box"
                        style="display: flex; justify-content: space-between"
                      >
                        <span
                          ><i class="el-icon-collection"></i>
                          {{
                            brandList.join(" ") + " "
                          }}流量-订单转化分析</span
                        >
                      </div>
                      <MixChart
                        :id="'echartTarget'"
                        :minchartData="echartTarget"
                        height="410px"
                        width="100%"
                      />
                    </el-card>
                  </el-col>
                </el-row>
              </el-col>
            </el-row>
          </section>

          <section>
            <el-row style="background: #fff; margin-bottom: 16px">
              <el-card>
                <div
                  slot="header"
                  class="card-box"
                  style="display: flex; justify-content: space-between"
                >
                  <span>
                    <i class="el-icon-s-data" style="margin-right: 5px" />{{
                      brandList.join(" ") + " "
                    }}直播效果分析
                  </span>
                </div>
                <LineMarker
                  :id="'roiTarget'"
                  :minchartData="roiTarget"
                  height="410px"
                  width="100%"
                />
              </el-card>
            </el-row>
          </section>
        </section> 
      </el-tab-pane>-->
      <el-tab-pane label="经营概况" name="5">
        <operation v-if="activeName == 5" :query="query" />
      </el-tab-pane>
      <el-tab-pane label="店铺自营分析" name="1">
        <ShopSelfOperate v-if="activeName == 1" :query="query" />
      </el-tab-pane>
      <el-tab-pane label="直播间转化分析" name="2">
        <room v-if="activeName == 2" :query="query" />
      </el-tab-pane>
      <el-tab-pane label="直播流量转化分析" name="3">
        <roomLST v-if="activeName == 3" :query="query" />
      </el-tab-pane>
      <!-- <el-tab-pane label="商品监控" name="4">
        <Shop v-if="activeName == 4" :query="query" />
      </el-tab-pane> -->
    </el-tabs>

    <!-- <section id="section7">
      <el-row :gutter="10" style="padding: 16px 0">
        <el-col :span="17">
          <el-card>
            <div slot="header">
              <span><i class="el-icon-collection"></i> 店铺库存排行</span>
            </div>
          </el-card>
        </el-col>
      </el-row>
    </section>

    <section id="section8">
      <el-row :gutter="10">
        <el-col :span="10">
          <el-card style="height: calc(100vh - 125px)">
            <div slot="header">
              <span><i class="el-icon-collection"></i> 销售地区Top20</span>
            </div>
          </el-card>
        </el-col>

        <el-col :span="14">
          <el-card style="height: calc(100vh - 125px)">
            <div ref="platform" style="width: 1100px; height: 960px"></div>
          </el-card>
        </el-col>
      </el-row>
    </section> -->
  </div>
</template>

<script>
import {
  listBiSaleAmount,
  getBiSaleAmount,
  delBiSaleAmount,
  addBiSaleAmount,
  updateBiSaleAmount,
  synData,
  selectSaleTracking,
  selectSaleTargetStatistics,
  //饼图
  brandSaleAmount,
  //环比
  channelSaleAmountYoy,
} from "@/api/sale/BiSaleAmount";
import KoiCardI from "./components/KoiCardI.vue";
import KoiCardII from "./components/KoiCardII.vue";
import KoiCardIII from "./components/KoiCardIII.vue";
import KoiCardIV from "./components/KoiCardIV.vue";

// import echarts from "echarts";
import * as echarts from "echarts/lib/echarts.js";
require("echarts/extension/bmap/bmap");
import "echarts/map/js/china.js"; //引入中国地图数据
import city from "echarts/map/json/china-cities.json";
import date from "./day/date.vue";
import chartDataI from "./components/chartDataI";
import chartData from "./components/chartData";

import MinChart from "@/views/sale/Dy/Chart/MinChart.vue";
import MixChart from "./Chart/MixChart.vue";
import timeSearch from "./day/day.vue";
import exhaustionDay from "./day/exhaustionDay.vue";
// import waterLevelChart from "./waterLevelChart";
import progressMonthly from "./components/progressMonthly";
import progressYear from "./components/progressYear";
import progressDy from "./components/progressDy";
import card from "./Chart/card.vue";

// import channel from "@/views/sale/channel/index.vue";
import operation from "./operation/index.vue";
import ShopSelfOperate from "./ShopSelfOperate/index.vue";
import room from "./room/index.vue";
import roomLST from "./roomLST/index.vue";
import Shop from "@/views/sale/taobao/Shop/index.vue";
import PanelGroup from "./components/PanelGroup";
import PanelGroupI from "./components/PanelGroupI";
import PanelGroupII from "./components/PanelGroupII";
import PanelGroupDate from "./components/PanelGroupDate";
import PanelGroupWeek from "./components/PanelGroupWeek";
// import LineChart from './components/LineChart'
import chartDataRaddar from "./components/chartDataRaddar";
import MergeTable from "./components/MergeTable";
import liveTable from "./components/liveTable";
import chartDataRate from "./components/chartDataRate";
import PieChart from "./components/PieChart";
import BarChart from "./components/BarChart";
import funnelDate from "./Chart/funnelDate.vue";
import LineMarker from "./Chart/LineMarker.vue";
import {
  selectDySaleOverview,
  selectDyMQYSaleProgress,
  selectDyYMQCrowdSaleType,
  selectGMVReachTrend,
  selectSaleAmountRatio,
  selectSaleAmountTrend,
  selectShopSelfOperate,
  selectShopSelfOperateDetail,
} from "@/api/sale/BiDySaleDwd";
import {
  selectLiveConversionDetail,
  selectLiveConversionTrend,
  selectLiveConversion,
  selectFlowStructure,
  selectFlowOrderConversion,
  selectLiveResultTrend,
} from "@/api/sale/BiLiveReview";

import { listBrandChannelShop, listAll } from "@/api/chart/brandChannelShop";

const lineChartData = {};
import CountTo from "vue-count-to";
export default {
  name: "Admin",
  dicts: [
    "sys_product_item",
    "sys_product_secondary",
    "sys_product_cycle",
    "sys_product_pl",
    "sys_product_pp",
  ],
  components: {
    CountTo,
    funnelDate,
    chartDataRaddar,
    // GithubCorner,
    PanelGroup,
    PanelGroupI,
    PanelGroupII,
    PanelGroupDate,
    PanelGroupWeek,
    card,
    progressMonthly,
    progressYear,
    progressDy,
    // LineChart,

    // RaddarChart,
    PieChart,
    BarChart,

    chartData,
    chartDataI,
    MinChart,
    MixChart,
    // TransactionTable,
    // TodoList,
    // BoxCard
    timeSearch,
    exhaustionDay,
    date,
    // channel,
    operation,
    ShopSelfOperate,
    room,
    roomLST,
    Shop,
    KoiCardI,
    KoiCardII,
    KoiCardIII,
    KoiCardIV,
    MergeTable,
    liveTable,
    chartDataRate,
    LineMarker,
  },
  data() {
    return {
      count: 0,
      duration: 500,
      decimals: 2,

      activeName: 0,
      funnelroomList: [],
      funnelProductList: [],
      liveDataList: {
        columns: [],
        rows: [],
      },
      liveOperatedList: [],
      //自营表格
      selfOperatedList: [],
      propertyType: "selfOperatedSalesAmount",
      labelType: "汇总",
      //人群指标数据
      SaleTypedata: {},
      //BI指标数据
      biNumberItem: {},
      weekList: {},
      dateList: {},
      //第一栏
      itemData: {},

      query: {},
      // 店铺
      cascadeList: [],
      // , "天猫", "vfu运动旗舰店"
      brandList: ["VFU"],
      typeArr: [
        { value: "month", label: "MTD" },
        { value: "quarterly", label: "QTD" },
        { value: "year", label: "YTD" },
      ],
      dateType: "month",

      typeDy: [
        { value: "汇总", label: "汇总" },
        { value: "自营", label: "自营" },
        { value: "合作", label: "合作" },
      ],
      dateType: "month",
      //成交趋势
      barChartData: {
        columns: [],
        rows: [],
      },
      //环比
      PieData: [],
      //趋势图
      skcitemData: [],
      //饼图
      PieChartData: {
        // order: {
        xData: [],
        female: [],
      },

      //最后一部分
      roiTarget: {
        // order: {
        xData: [],
        female: [],
        male: [],
        average: [],
      },
      echartTarget: {
        // order: {
        xData: [],
        female: [],
        male: [],
        average: [],
      },

      echartDataMin: {
        // order: {
        xData: [],
        female: [],
        male: [],
        average: [],
      },
      //第一部分
      echartData: {
        value: 0,
        name: "",
        bg: "",
      },
      echartDataquarterly: {
        value: 0,
        name: "",
        bg: "",
      },
      echartDatamonthly: {
        value: 0,
        name: "",
        bg: "",
      },

      //品类属性
      itemType: [
        { value: "selfOperatedSalesAmount", label: "自营销售额" },
        { value: "selfOperatedReturnAmount", label: "自营退款金额" },
        { value: "selfOperatedOrderCount", label: "自营成交订单数" },
        { value: "shopProductVisitorCount", label: "店铺商品访客数" },
        { value: "selfOperatedBuyerCount", label: "自营成交人数" },
      ],
      //价格带
      list: [],
      //多选品类
      formData: {
        libraryIdList: [{ id: "" }],
      },
      libraryOptions: [], // 库存名称列表

      //雷达图
      echartDataRaddar: [],
      //总览数据
      itemData: {},
      // 总条数
      total: 0,
      // 查询参数
      queryParams: {
        // pageNum: 1,
        // pageSize: 10,
        // property: "salesAmount",
        // firstLevelList: null,
        // secondLevelList: null,
        // threeLevelList: null,
      },
      //商品排行
      ItemDateList: [],
      //产品视角
      productView: "一级",

      //锚点
      sections: document.querySelectorAll("section"),
      activeSection: null,
      active: null,
      scrollTimer: null,
      //地区前20
      TopSallist: [],
      //时间控件
      timeObj: {},
      //客单价
      biNumberOfItem: "",

      //时间控件
      valueTime: new Date(new Date().setDate(new Date().getDate() - 1)),
      groupType: "date",

      highlighted: ["销售金额", "退款金额", "净销售额"], // 初始化时，前两个元素高亮

      //传递数据
      // echartData: {
      //   columns: ["支付日期", "销售金额", "退款金额", "净销售额"],
      //   rows: [],
      // },
      highlightedSku: ["库存总金额", "产品库存总金额", "配件库存总金额"], // 初始化时，前两个元素高亮

      //Sku传递数据
      echartDataSku: {
        columns: ["支付日期", "销售金额"],
        rows: [],
      },
      //时间
      dayActive: 15,
      monthActive: false,
      timeArr: [
        // { value: "2", label: "昨天" },
        { value: "15", label: "最近15天" },
        // { value: "30", label: "最近30天" },
        { value: "365", label: "月" },
        { value: "1", label: "日" },
      ],
      timeGap: { startTime: "", endTime: "" },

      loading: false,
      //店铺名称
      shopName: "",
      mapData: [],
      lineChartData: lineChartData.newVisitis,
    };
  },
  created() {
    this.getList();

    // this.handleChangeTime()
    /** 查询品牌渠道店铺关系列表 */
    this.getdataSourceList();
    // this.openLoading();
  },
  // mounted() {
  //   this.$store.dispatch("app/toggleSideBarHide", fa);
  // },
  watch: {
    brandList: {
      handler: function (newnew, oldold) {
        console.log(JSON.stringify(newnew));
        this.query = {
          brandList: this.brandList,
          dateType: this.dateType,
        };
        if (!this.query.brandList) {
          return;
        }
        if (this.activeName != 0) {
          return;
        }
        this.getselectDySaleOverview("date");
        this.getselectDySaleOverview("week");
        this.getselectDySaleOverview(this.dateType);

        this.getselectSaleSingle();

        // this.getselectDyYMQCrowdSaleType();
        // //GMV趋势图
        // this.getselectGMVReachTrend();
        // this.getselectSaleAmountRatio();
        // this.getselectSaleAmountTrend();
        // //可选趋势图
        // this.getselectShopSelfOperate();
        // //上表格
        // this.getselectShopSelfOperateDetail();
        // //下表格
        // this.getselectLiveConversionDetail();
        // //直播间率
        // this.getselectLiveConversionTrend();
        // //漏斗
        // this.getselectLiveConversion();
        // //饼图
        // this.getselectFlowStructure();
        // //
        // this.getselectFlowOrderConversion();
        // //
        // this.getselectLiveResultTrend();
      },
      deep: true,
      immediate: true,
    },
    dateType: {
      handler: function (newnew, oldold) {
        console.log(JSON.stringify(newnew));
        if (this.brandList.length == 0) {
          return;
        }
        this.query = {
          brandList: this.brandList,
          dateType: this.dateType,
        };
        if (this.activeName != 0) {
          return;
        }
        this.getselectDySaleOverview(this.dateType);

        // this.getselectDyYMQCrowdSaleType();

        // this.getselectGMVReachTrend();
        // this.getselectSaleAmountRatio();
        // this.getselectSaleAmountTrend();
        // this.getselectShopSelfOperate();
        // this.getselectShopSelfOperateDetail();
        //下表格
        // this.getselectLiveConversionDetail();
        // //直播间率
        // this.getselectLiveConversionTrend();
        // //漏斗
        // this.getselectLiveConversion();
        // //饼图
        // this.getselectFlowStructure();
        // //
        // this.getselectFlowOrderConversion();
        // //roi
        // this.getselectLiveResultTrend();
      },
      deep: true,
      immediate: true,
    },
  },
  mounted() {
    window.addEventListener("scroll", this.startScrollTimer);
  },
  beforeDestroy() {
    window.removeEventListener("scroll", this.startScrollTimer);
  },

  methods: {
    // twoFixed(number) {
    //   // 将数字保留两位小数，并转为字符串
    //   const numberStr = number.toFixed(2);

    //   // 分割整数部分和小数部分
    //   const [integerPart, decimalPart] = numberStr.split(".");

    //   // 将整数部分按千分位分隔
    //   const integerPartWithCommas = integerPart.replace(
    //     /\B(?=(\d{3})+(?!\d))/g,
    //     ","
    //   );

    //   // 拼接整数部分和小数部分
    //   return integerPartWithCommas + "." + (decimalPart || "00");
    // },
    handleClick(tab, event) {
      // console.log(tab);
      if (tab.name == "0") {
        this.getselectSaleSingle();
      }
    },
    //roi
    getselectLiveResultTrend() {
      selectLiveResultTrend(this.query).then((response) => {
        if (response.length == 0) {
          return;
        }
        this.roiTarget.xData = response.map((item) => item.dataDateUnit);
        //销售目标
        this.roiTarget.female = response.map((item) =>
          item.totalTransactionAmount ? item.totalTransactionAmount : null
        );
        //销售额
        this.roiTarget.male = response.map((item) => item.cpcThousandViews);
        //达成率
        this.roiTarget.average = response.map((item) => item.roi);
      });
    },
    //流量-订单转化分析
    getselectFlowOrderConversion() {
      selectFlowOrderConversion(this.query).then((response) => {
        if (response.length == 0) {
          return;
        }
        this.echartTarget.xData = response.map((item) => item.trafficSource);
        //销售目标
        this.echartTarget.female = response.map((item) =>
          item.completedOrdersCountRatio ? item.completedOrdersCountRatio : null
        );
        //达成率
        this.echartTarget.average = response.map(
          (item) => item.watchConversionRate
        );
      });
    },
    //饼图
    getselectFlowStructure() {
      selectFlowStructure(this.query).then((response) => {
        if (response) {
          let row = [];
          row.push({
            value: response.liveNaturalOrderCount,
            name: "自然流量",
          });
          row.push({
            value: response.livePaidOrderCount,
            name: "付费流量",
          });
          this.PieChartData.xData = ["自然流量", "付费流量"];
          this.PieChartData.female = row;
        }
      });
    },
    //漏斗
    getselectLiveConversion() {
      selectLiveConversion(this.query).then((response) => {
        // response = {
        //   createBy: null,
        //   createTime: null,
        //   updateBy: null,
        //   updateTime: null,
        //   remark: null,
        //   id: null,
        //   shopId: null,
        //   shopName: null,
        //   dataDate: null,
        //   trafficSource: null,
        //   liveDuration: null,
        //   avgWatchDuration: null,
        //   roomExposureCount: 30,
        //   roomWatchCount: 2,
        //   roomExposureToWatchRate: 1,
        //   roomInteractionCount: 2,
        //   roomWatchToInteractionRate: 1,
        //   newFollowersCount: 2,
        //   productExposureCount: 2,
        //   productClickCount: 2,
        //   productExposureToClickRate: 1,
        //   productClickToOrderRate: 1,
        //   completedOrdersCount: 1,
        //   uniqueBuyersCount: null,
        //   totalTransactionAmount: null,
        //   soldItemsCount: null,
        //   gmvPerThousandViews: null,
        //   averageOrderValue: null,
        //   cpcThousandViews: null,
        //   payConversionRate: 1,
        //   viewProductExposureRate: null,
        //   dataDateUnit: null,
        //   dataYear: null,
        //   dataMonth: null,
        //   dataQuarter: null,
        //   dataWeek: null,
        // };
        if (response) {
          let row = [];
          row.push(
            {
              name: "直播间曝光次数",
              value: response.roomExposureCount,
              yoy: response.roomExposureCountYoy,
            },
            {
              name: "直播间观看次数",
              value: response.roomWatchCount,
              yoy: response.roomWatchCountYoy,
              twoname: "曝光观看率",
              twoyoy: response.payConversionRate,
            },
            {
              name: "直播间成交订单数",
              value: response.completedOrdersCount,
              yoy: response.completedOrdersCountYoy,
              twoname: "支付转化率",
              twoyoy: response.payConversionRate,
            }
          );
          this.funnelroomList = row;

          let list = [];

          list.push({
            name: "商品曝光次数",

            value: response.productExposureCount,
            yoy: response.productExposureCountYoy,
          });
          list.push({
            name: "商品点击次数",
            value: response.productClickCount,
            yoy: response.productClickCountYoy,
            twoname: "商品曝光-点击率",
            twoyoy: response.productExposureToClickRate,
          });
          list.push({
            name: "商品成交件数",
            value: response.soldItemsCount,
            yoy: response.soldItemsCountYoy,
            twoname: "商品点击-成交率",
            twoyoy: response.productClickToOrderRate,
          });
          this.funnelProductList = list;
        }
      });
    },
    //
    getselectLiveConversionTrend() {
      selectLiveConversionTrend(this.query).then((response) => {
        this.liveDataList = {
          columns: [],
          rows: [],
        };

        this.liveDataList.columns.push(
          "日期",
          "商品点击成交率",
          "商品曝光点击率",
          "直播间曝光成交率",
          "直播间曝光观看率"
          // "自营搜索",
          // "达人直播",
          // "达人短视频",
          // "达人商品卡",
          // "达人搜索"
        );
        response.forEach((item) => {
          this.liveDataList.rows.push({
            日期: item.dataDateUnit,

            商品点击成交率: item.productClickToOrderRate,
            商品曝光点击率: item.productExposureToClickRate,
            直播间曝光成交率: item.payConversionRate,
            直播间曝光观看率: item.roomExposureToWatchRate,
            // 达人直播: item.inflvencerLiveSalesAmount,
            // 达人短视频: item.inflvencerProductCardSalesAmount,
            // 达人商品卡: item.influencerVideoSalesAmount,
            // 达人搜索: item.influencerOtherSalesAmount,
          });
        });
      });
    },
    getselectLiveConversionDetail() {
      selectLiveConversionDetail(this.query).then((response) => {
        this.liveOperatedList = response;
      });
    },
    getselectShopSelfOperateDetail() {
      selectShopSelfOperateDetail(this.query).then((response) => {
        this.selfOperatedList = response;
      });
    },
    getselectShopSelfOperate() {
      let obj = {
        ...this.query,
        property: this.propertyType,
      };
      selectShopSelfOperate(obj).then((response) => {
        let order = { date: [], data: [] };
        order.date = response.map((item) => item.dataDateUnit);
        response.forEach((item) => {
          order.data.push(item.keywordProperty);
        });
        const xData = order.date;
        const keyArray = Object.keys(order.data[0]);
        const series = [];
        keyArray.forEach((key) => {
          series.push({
            name: key,
            data: order.data.map((item) => item[key]),
            type: "line",
          });
        });

        // let tooltip = {};
        // if (this.queryParams.property == "payConversionRate") {
        //   tooltip = {
        //     trigger: "axis",
        //     formatter: "{c}%",
        //   };
        // } else {
        //   tooltip = {
        //     trigger: "axis",
        //   };
        // }

        const option = {
          grid: {
            left: "5%",
            top: "10%",
            right: "3%",
            bottom: "10%",
          },
          // 提示框
          tooltip: { trigger: "axis" },
          xAxis: {
            data: xData,
          },
          yAxis: {},
          legend: {
            data: keyArray,
          },
          series,
        };

        var myChartDom = this.$refs.echarts;

        // 检查是否已经存在ECharts实例
        if (echarts.getInstanceByDom(myChartDom)) {
          // 如果存在，销毁它
          echarts.getInstanceByDom(myChartDom).dispose();
        }

        // 初始化新的ECharts实例
        var myChart = echarts.init(myChartDom);

        // Raddar.setOption(option);
        myChart.setOption(option);

        // this.echartData.order.xData = xData;
        // this.echartData.order.series = series;
        // const E = echarts.init(this.$refs.echarts);
        // // E.dispose();
        // E.setOption(option);
      });
    },
    getselectSaleAmountTrend() {
      selectSaleAmountTrend(this.query).then((response) => {
        this.barChartData = {
          columns: [],
          rows: [],
        };
        this.barChartData.columns.push(
          "日期",
          "自营直播",
          "自营短视频",
          "自营商品卡",
          "自营搜索",
          "达人直播",
          "达人短视频",
          "达人商品卡",
          "达人搜索"
        );
        response.forEach((item) => {
          this.barChartData.rows.push({
            日期: item.dataDateUnit,

            自营直播: item.selfOperatedLiveSalesAmount,
            自营短视频: item.selfOperatedVideoSalesAmount,
            自营商品卡: item.selfOperatedProductCardSalesAmount,
            自营搜索: item.selfOperatedOtherSalesAmount,
            达人直播: item.inflvencerLiveSalesAmount,
            达人短视频: item.inflvencerProductCardSalesAmount,
            达人商品卡: item.influencerVideoSalesAmount,
            达人搜索: item.influencerOtherSalesAmount,
          });
        });
      });
    },

    getselectSaleAmountRatio() {
      selectSaleAmountRatio(this.query).then((response) => {
        var option = {
          title: {
            // text: "库存价值占比",
          },
          tooltip: {
            trigger: "axis",
            axisPointer: {
              type: "shadow",
            },
          },
          // grid: {
          //   left: "3%",
          //   right: "4%",
          //   bottom: "3%",
          //   containLabel: true,
          // },
          legend: {
            data: ["销售金额"],
          },
          xAxis: [
            {
              type: "category",
              data: [
                "自营直播",
                "自营短视频",
                "自营商品卡",
                "自营搜索",
                "达人直播",
                "达人短视频",
                "达人商品卡",
                "达人搜索",
              ],
              axisLabel: {
                interval: 0, //代表显示所有x轴标签显示
                // rotate: 45, //代表逆时针旋转45度
              },
              axisTick: {
                alignWithLabel: true,
              },
            },
          ],
          yAxis: [
            {
              type: "value",
            },
          ],
          series: [
            {
              name: "销售金额",
              type: "bar",
              barWidth: "20%",
              data: [],
              tooltip: {
                valueFormatter: function (value) {
                  return value + " 万";
                },
              },
            },
          ],
        };

        let res = [];
        res.push(response);
        // 从 JSON 数据中提取库存数量，并填充到 series.data 中
        res.forEach(function (item) {
          option.series[0].data.push(
            item.selfOperatedLiveSalesAmount,
            item.selfOperatedVideoSalesAmount,
            item.selfOperatedProductCardSalesAmount,
            item.selfOperatedOtherSalesAmount,
            item.inflvencerLiveSalesAmount,
            item.inflvencerProductCardSalesAmount,
            item.influencerVideoSalesAmount,
            item.influencerOtherSalesAmount
          );
        });

        // 使用刚指定的配置项和数据显示图表。
        //   myChart.setOption(option);
        var myChartDom = document.getElementById("echartsAll");

        // 检查是否已经存在ECharts实例
        if (echarts.getInstanceByDom(myChartDom)) {
          // 如果存在，销毁它
          echarts.getInstanceByDom(myChartDom).dispose();
        }

        // 初始化新的ECharts实例
        var myChart = echarts.init(myChartDom);

        // Raddar.setOption(option);
        myChart.setOption(option);
      });
    },
    getselectGMVReachTrend() {
      let obj = {
        ...this.query,
        label: this.labelType,
      };
      selectGMVReachTrend(obj).then((response) => {
        this.echartDataMin.xData = response.map((item) => item.dataDateUnit);
        //销售目标
        this.echartDataMin.female = response.map((item) =>
          item.salesTarget ? item.salesTarget : null
        );
        //销售额
        this.echartDataMin.male = response.map((item) => item.saleAmount);
      });
    },
    getselectDyYMQCrowdSaleType() {
      selectDyYMQCrowdSaleType(this.query).then((response) => {
        this.SaleTypedata = response ? response : {};
      });
    },

    getselectDySaleOverview(value) {
      let obj = {
        brandList: this.brandList,
        //   brand: this.brandList[0],
        //   channel: this.brandList[1],
        dateType: value,
      };

      selectDySaleOverview(obj).then((response) => {
        if (response) {
          if (value == "date") {
            this.dateList = response;
            // this.getselectChannelConversion(obj);
          } else if (value == "week") {
            this.weekList = response;
            // this.getselectChannelConversion(obj);
          } else {
            this.biNumberItem = response;
          }
        }
      });
    },
    //指标点击回传
    handleSetLineChartData(type) { },

    getselectSaleTargetStatistics() {
      this.query = {
        brandList: this.brandList,
        dateType: this.dateType,
      };
      selectSaleTargetStatistics(this.query).then((response) => {
        this.queryParams = {};
        this.queryParams.company = this.brandList[0];
        this.queryParams.dataYear = response[response.length - 1].dataYear;
        this.queryParams.dataMonth = response[response.length - 1].dataMonth;
        if (response[response.length - 1].dataDate) {
          this.queryParams.dataDate = response[response.length - 1].dataDate;
        }

        this.getskuBySkcSaleList();

        // if (response.length == 0) {
        //   this.echartDataMin = {};
        //   // return;
        // }
        // if (response.length > 0) {
        response.forEach((item, index) => {
          item.id = index;
        });
        this.skcitemData = response;
        this.echartDataMin.xData = response.map((item) =>
          item.dataDate ? item.dataDate : item.dataMonth
        );
        //销售目标
        this.echartDataMin.female = response.map((item) =>
          item.saleTarget ? item.saleTarget : null
        );
        //销售额
        this.echartDataMin.male = response.map((item) => item.saleAmount);
        //达成率
        this.echartDataMin.average = response.map(
          (item) => item.completionRate
        );
        // }
        return;
      });
    },
    //skc图表点击
    SetLineChartData(index) {
      return;
      console.log(index);
      this.skcitemData.forEach((item) => {
        if (index == item.id) {
          console.log(JSON.stringify(item));
          // let obj = {
          //   dataYear: item.dataYear,
          //   dataMonth: item.dataMonth,
          //   company: this.brandList[0],
          // };
          this.queryParams = {};
          if (!item.dataDate) {
            this.queryParams.dataYear = item.dataYear;
            this.queryParams.dataMonth = item.dataMonth;
          } else {
            this.queryParams.dataDate = item.dataDate;
          }

          this.queryParams.company = this.brandList[0];
          this.getskuBySkcSaleList();
        }
      });
    },
    //饼图点击
    SetPieChartData(index) {
      this.PieData.forEach((item) => {
        if (index == item.id) {
          // let obj = {
          //   dataYear: item.dataYear,
          //   dataMonth: item.dataMonth,
          //   company: this.brandList[0],
          // };
          // this.queryParams.dataYear = item.dataYear;
          // this.queryParams.dataMonth = item.dataMonth;
          // this.queryParams.company = this.brandList[0];

          this.getchannelSaleAmountYoy(item.brand);
        }
      });
    },
    //环比
    getchannelSaleAmountYoy(brand) {
      let obj = {
        label: "channel",
        brand: brand,
        ...this.queryParams,
      };

      channelSaleAmountYoy(obj).then((response) => {
        // this.barChartData.columns = ["gpuType", "val1", "val2"];
        // this.barChartData = {
        //   columns: [],
        //   rows: [],
        // };
        // this.barChartData.columns.push("渠道", "销售增长率");
        // response.forEach((item) => {
        //   this.barChartData.rows.push({
        //     渠道: item.channel,
        //     销售增长率: item.saleAmountYoy,
        //   });
        // });
        // if (response.length == 0) {
        //   var myChartDom = this.$refs.barecharts;

        //   // 检查是否已经存在ECharts实例
        //   if (echarts.getInstanceByDom(myChartDom)) {
        //     // 如果存在，销毁它
        //     echarts.getInstanceByDom(myChartDom).dispose();
        //   }
        //   return;
        // }
        const channel = response.map((item) => item.channel);
        const saleAmountChain = response.map((item) => item.saleAmountChain);

        const option = {
          tooltip: {
            trigger: "axis",
            axisPointer: {
              type: "shadow",
            },
          },
          grid: {
            top: 80,
            bottom: 30,
          },
          xAxis: {
            type: "value",
            position: "top",
            splitLine: {
              lineStyle: {
                type: "dashed",
              },
            },
          },
          yAxis: {
            type: "category",
            axisLine: { show: false },
            axisLabel: { show: false },
            axisTick: { show: false },
            splitLine: { show: false },
            data: channel,
          },
          series: [
            {
              name: "销售增长率",
              type: "bar",
              stack: "Total",
              barWidth: 15,
              label: {
                position: "right",
                show: true,
                formatter: "{b}:{c}%",
              },
              data: saleAmountChain,
              itemStyle: {
                normal: {
                  color: function (params) {
                    var index_color = params.value;

                    if (index_color < 0) {
                      return "#fe4365";
                    } else {
                      return "#25daba";
                    }
                  },
                },
              },
            },
          ],
        };

        //   myChart.setOption(option);
        var myChartDom = this.$refs.barecharts;

        // 检查是否已经存在ECharts实例
        if (echarts.getInstanceByDom(myChartDom)) {
          // 如果存在，销毁它
          echarts.getInstanceByDom(myChartDom).dispose();
        }

        // 初始化新的ECharts实例
        var myChart = echarts.init(myChartDom);
        // if (response.length == 0) {
        //   return;
        // } else {
        myChart.setOption(option);
      });
    },
    //饼图
    getskuBySkcSaleList() {
      if (this.query.dateType == "month") {
        this.queryParams.dateType = "date";
      } else {
        this.queryParams.dateType = "month";
      }

      brandSaleAmount(this.queryParams).then((response) => {
        console.log(JSON.stringify(response));
        if (response.length < 1) {
          return;
        }

        response.forEach((item, index) => {
          item.id = index;
        });
        // this.skcitemData = response;
        this.PieData = response;
        this.getchannelSaleAmountYoy(this.PieData[0].brand);
        if (response) {
          let row = [];
          response.forEach((item) => {
            row.push({
              value: item.saleAmount,
              name: item.brand,
            });
          });
          // this.PieChartData.female
          this.PieChartData.xData = response.map((item) => item.brand);
          this.PieChartData.female = row;
        }
      });
    },
    //销售指标
    getselectSaleSingle() {
      // , dateType: "year"
      let obj = { brandList: this.brandList };

      this.count++;
      selectDyMQYSaleProgress(obj).then((response) => {
        if (response) {
          this.itemData = response ? response : {};
          this.echartData.value = response.yearCompletionRate;
          this.echartData.name = "年度完成率";
          if (response.yearCompletionRate > response.yearProgress) {
            this.echartData.bg = "#2ba245";
          } else {
            this.echartData.bg = "#ff3334";
          }
          this.echartData.count = this.count;

          this.echartDataquarterly.value = response.quarterlyCompletionRate;
          this.echartDataquarterly.name = "季度完成率";
          if (response.quarterlyCompletionRate > response.quarterlyProgress) {
            this.echartDataquarterly.bg = "#2ba245";
          } else {
            this.echartDataquarterly.bg = "#ff3334";
          }
          this.echartDataquarterly.count = this.count;

          this.echartDatamonthly.value = response.monthlyCompletionRate;
          this.echartDatamonthly.name = "本月完成率";
          if (response.monthlyCompletionRate > response.monthlyProgress) {
            this.echartDatamonthly.bg = "#2ba245";
          } else {
            this.echartDatamonthly.bg = "#ff3334";
          }
          this.echartDatamonthly.count = this.count;
        }
        // console.log(JSON.stringify(this.biNumberItem));
      });
    },
    //店铺控件
    handleChange(val) {
      return;
      // console.log(JSON.stringify(val));
      // // let obj = { brandList: this.this.brandList, ...this.timeObj };
      // let obj = { brandList: this.this.brandList };
      // console.log(JSON.stringify(obj));

      // localStorage.removeItem("result");
      // // localStorage.setItem("result", JSON.stringify(obj));

      // if (!obj.endTime) {
      //   return;
      // } else {
      //   //销售指标

      //   //渠道库存Top
      //   this.channelInventoryTop(obj);
      //   //店铺库存Top
      //   this.shopInventoryTop(obj);
      //   //曲线
      //   this.getechartChannelData(obj);

      //   //渠道SaleTop
      //   this.getchannelSaleTop(obj);
      //   //店铺SaleTop
      //   this.getshopSaleTop(obj);
      //   //商品排行Top
      //   this.changeView();
      // }
      // let param = {
      //   dataSource: this.brandList,
      //   startTime: this.dateFormat(this.timeObj.startTime),
      //   endTime: this.dateFormat(this.timeObj.endTime),

      // };
      // console.log(JSON.stringify(param));
      // if (!param.endTime) {
      //   return;
      // } else {
      //   // this.getechartChannelData(obj)
      //   this.getnumberOfItem(param);
      //   this.getTopSal(param);
      // }
    },
    //选完时间后发请求
    handleChangeTime(timeObj) {
      // console.log(type)
      // console.log(timeObj)
      // TODO
      this.timeObj = timeObj;
      if (this.brandList.length <= 0) {
        return;
      }
      return;
      let param = {
        dataSource: this.brandList,
        startTime: this.dateFormat(timeObj.startTime),
        endTime: this.dateFormat(timeObj.endTime),
      };
      console.log(JSON.stringify(param));
      if (!param.endTime) {
        return;
      } else {
        // this.getechartChannelData(obj)
        //客件数
        this.getnumberOfItem(param);
        //地区Top20
        this.getTopSal(param);
      }
      console.log(JSON.stringify(this.timeObj));

      let obj = { brandList: this.this.brandList };

      console.log(JSON.stringify(obj));

      localStorage.removeItem("result");
      localStorage.setItem("result", JSON.stringify(obj));

      if (!obj.endTime) {
        return;
      } else {
        //渠道库存Top
        this.channelInventoryTop(obj);
        //店铺库存Top
        this.shopInventoryTop(obj);
        //曲线
        this.getechartChannelData(obj);

        //渠道SaleTop
        this.getchannelSaleTop(obj);
        //店铺SaleTop
        this.getshopSaleTop(obj);
        //商品排行Top
        this.changeView();
      }
    },
    //分页
    //售罄时间定义
    changePage() { },
    //视图角度
    changeView(val) { },

    // 时间格式转换
    dateFormat(date) {
      date = new Date(date);
      let Y = date.getFullYear() + "-";
      let M =
        (date.getMonth() + 1 < 10
          ? "0" + (date.getMonth() + 1)
          : date.getMonth() + 1) + "-";
      let D = date.getDate() < 10 ? "0" + date.getDate() : date.getDate() + "";
      return Y + M + D;
    },
    /** 查询品牌渠道店铺关系列表 */
    getdataSourceList() {
      listAll().then((response) => {
        let result = this.transformData(response);
        this.brandList = [result[0].label];
        this.cascadeList = result;
      });
    },
    //店铺渠道品牌转换

    transformData(data) {
      let result = [];

      data.forEach((item) => {
        let brand = item.brand;
        // let channel = item.brand;
        // let shopName = item.shopName;

        // 如果brand在结果数组中不存在，则创建一个新的数组
        let brandIndex = result.findIndex(
          (brandObj) => brandObj.label === brand
        );
        if (brandIndex === -1) {
          result.push({
            label: brand,
            value: brand,
            // children: [],
          });
          brandIndex = result.length - 1;
        }

        // 如果channel在当前brand的children数组中不存在，则创建一个新的数组
        // let channelIndex = result[brandIndex].children.findIndex(
        //   (channelObj) => channelObj.label === channel
        // );
        // if (channelIndex === -1) {
        //   result[brandIndex].children.push({
        //     label: channel,
        //     value: channel,
        //     // children: [],
        //   });
        //   channelIndex = result[brandIndex].children.length - 1;
        // }

        // 如果shopName在当前channel的children数组中不存在，则创建一个新的数组
        // let shopIndex = result[brandIndex].children[
        //   channelIndex
        // ].children.findIndex((shopObj) => shopObj.label === shopName);
        // if (shopIndex === -1) {
        //   result[brandIndex].children[channelIndex].children.push({
        //     label: shopName,
        //     value: shopName,
        //     // children: []
        //   });
        // }
      });

      return result;
    },
    //锚点
    scrollToSection(index) {
      const target = this.sections[index];
      // console.log(JSON.stringify(index));
      //     return
      this.active = index;
      if (target) {
        this.$nextTick(() => {
          target.scrollIntoView({ behavior: "smooth" });
          this.activeSection = target;
        });
      }
    },
    //锚点
    startScrollTimer() {
      this.scrollTimer = setInterval(() => {
        const currentSection = document.querySelector("section[data-active]");
        if (currentSection !== this.activeSection) {
          this.activeSection = currentSection;
        } else {
          clearInterval(this.scrollTimer);
        }
      }, 100); // 每100毫秒检查一次滚动位置是否变化
    },
    //锚点高亮
    isActiveSection(sectionId) {
      // 检查当前导航项是否处于高亮状态
      return this.active === sectionId;
    },
    /** 查缓存询信息 */
    getList() { },
    // 打开加载层
    openLoading() {
      this.$modal.loading("正在加载分析销售监控数据，请稍候！");
    },
    //地区Top20
    getTopSal(param) { },
  },
};
</script>

<style lang="scss" scoped>
.el-tabs--card {
  height: calc(100vh - 110px);
  /* overflow-y: auto; */
}

.el-tab-pane {
  overflow-y: auto;
  height: calc(100vh - 110px);
}

::v-deep .el-tabs__content {
  /* height: 185px;
  border-radius: 4px; */
  background-color: rgb(240, 242, 245) !important;
  /* 使用你想要的蓝色 */
}

.el-dialog-div {
  overflow-x: hidden;
  height: 100vh;
}

.nomargin {
  display: flex;
  justify-content: center;
  align-items: center;
}

.content {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
  text-align: center;
}

.spanflex {
  display: flex;
  justify-content: space-between;
  width: 90px;
  border: 1px solid silver;
}

.flex {
  // border-color: aliceblue;
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  border: 1px solid silver;
}

/* 移除默认的列表样式 */
ul {
  /* 设置弹性布局，使列表项横向排列 */
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  margin-top: .4%;
  /* 添加一些内边距和背景颜色 */
  // padding: 10px;
  margin-right: 10px;
  list-style-type: none;

  /* 设置边框和圆角 */
  // border: 1px solid #ddd;
  border-radius: 5px;
}

/* 设置列表项样式 */
li {
  /* 添加一些内边距和右边距 */
  // padding: 10px;
  margin-right: 10px;
  color: #bbb;
  /* 设置链接文本样式 */
  font-size: 15px;
  text-decoration: none;
}

li.active a {
  // color: #f00;
  /* 高亮颜色 */
  color: #fff;
  background-color: #40c9c6;
}

// section {
//   margin-top: 60px;
// }

.dashboard-editor-container {
  position: relative;
  // padding: 16px;
  background-color: rgb(240, 242, 245);

  .github-corner {
    position: absolute;
    top: 0;
    right: 0;
    border: 0;
  }

  .chart-wrapper {
    padding: 16px 16px 0;
    margin-bottom: 16px;
    background: #fff;
  }
}

@media (max-width: 1024px) {
  .chart-wrapper {
    padding: 8px;
  }
}

// .train-tree-cascader {
//   height: 500px !important;
// }

// .el-scrollbar__wrap {
//   overflow: initial !important;
// }
</style>

    /** 自营销售目标 */
    @Excel(name = "自营销售目标")
    private Double selfSalesTarget;

    /** 销售额 */
    @Excel(name = "销售额")
    private Double saleAmount;
    private Double saleAmountChain;//环比
    private Double saleAmountYoy;//同比

    /** 退款金额 */
    @Excel(name = "退款金额")
    private Double returnAmount;
    private Double returnAmountChain;//环比
    private Double returnAmountYoy;//同比

    /** 净销售额 */
    @Excel(name = "净销售额")
    private Double netSalesAmount;
    private Double netSalesAmountChain;//环比
    private Double netSalesAmountYoy;//同比

    /** 下单数 */
    @Excel(name = "下单数")
    private Integer ordersNumber;
    private Double ordersNumberChain;//环比
    private Double ordersNumberYoy;//同比

    /** 客单价 */
    @Excel(name = "客单价")
    private Double customerUnitPrice;
    private Double customerUnitPriceChain;//环比
    private Double customerUnitPriceYoy;//同比

    /** 商品销售成本 */
    @Excel(name = "商品销售成本")
    private Double saleCostPro;
    private Double saleCostProChain;//环比
    private Double saleCostProYoy;//同比

    /** 退款率 */
    @Excel(name = "退款率")
    private Double refundRate;
    private Double refundRateChain;//环比
    private Double refundRateYoy;//同比

    /** 支付买家数(成交人数) */
    @Excel(name = "支付买家数(成交人数)")
    private Integer paidCustomers;
    private Double paidCustomersChain;//环比
    private Double paidCustomersYoy;//同比

    /** ROI */
    @Excel(name = "ROI")
    private Double roi;
    private Double roiChain;//环比
    private Double roiYoy;//同比



    /** 营销花费 */
    @Excel(name = "营销花费")
    private Double marketingCost;
    private Double marketingCostChain;//环比
    private Double marketingCostYoy;//同比

    /** 新增新客数 */
    @Excel(name = "新增新客数")
    private Integer newCustomerIncreaseCount;
    private Double newCustomerIncreaseCountChain;//环比
    private Double newCustomerIncreaseCountYoy;//同比

    /** 退款订单数 */
    @Excel(name = "退款订单数")
    private Integer refundOrderCount;
    private Double refundOrderCountChain;//环比
    private Double refundOrderCountYoy;//同比

    /** 直播成交金额 */
    @Excel(name = "直播成交金额")
    private Double liveSalesAmount;
    private Double liveSalesAmountChain;//环比
    private Double liveSalesAmountYoy;//同比

    /** 直播退款金额 */
    @Excel(name = "直播退款金额")
    private Double liveReturnAmount;
    private Double liveReturnAmountChain;//环比
    private Double liveReturnAmountYoy;//同比

    /** 直播间曝光次数 */
    @Excel(name = "直播间曝光次数")
    private Integer liveExposureCount;
    private Double liveExposureCountChain;//环比
    private Double liveExposureCountYoy;//同比

    /** 直播成交人数 */
    @Excel(name = "直播成交人数")
    private Integer liveSalesBuyerCount;
    private Double liveSalesBuyerCountChain;//环比
    private Double liveSalesBuyerCountYoy;//同比

    /** 账号新增粉丝数 */
    @Excel(name = "账号新增粉丝数")
    private Integer newFansCount;
    private Double newFansCountChain;//环比
    private Double newFansCountYoy;//同比

    /** 自营商品访客数 */
    @Excel(name = "自营商品访客数")
    private Integer shopProductVisitorCount;
    private Double shopProductVisitorCountChain;//环比
    private Double shopProductVisitorCountYoy;//同比

    /** 自营商品销售件数 */
    @Excel(name = "自营商品销售件数")
    private Integer selfOperatedSaleCount;
    private Double selfOperatedSaleCountChain;//环比
    private Double selfOperatedSaleCountYoy;//同比

    /** 自营商品点击转化率 */
    @Excel(name = "自营商品点击转化率")
    private Double selfOperatedProductClickConversionRate;
    private Double selfOperatedProductClickConversionRateChain;//环比
    private Double selfOperatedProductClickConversionRateYoy;//同比



    /** 合作达人数 */
    @Excel(name = "合作达人数")
    private Integer cooperationInfluencerCount;
    private Double cooperationInfluencerCountChain;//环比
    private Double cooperationInfluencerCountYoy;//同比

    /** 直播成交订单数 */
    @Excel(name = "直播成交订单数")
    private Integer liveOrderCount;
    private Double liveOrderCountChain;//环比
    private Double liveOrderCountYoy;//同比

    /** 千次观看成交金额 */
    @Excel(name = "千次观看成交金额")
    private Double thousandViewSalesAmount;
    private Double thousandViewSalesAmountChain;//环比
    private Double thousandViewSalesAmountYoy;//同比

    /** 年 */
    @Excel(name = "年")
    private Integer dataYear;

    /** 季度 */
    @Excel(name = "季度")
    private Integer dataQuarter;

    /** 月 */
    @Excel(name = "月")
    private Integer dataMonth;

    /** 周 */
    @Excel(name = "周")
    private Integer dataWeek;

    //目标达成率
    private Double targetCompletionRate;

    /** 店铺运营数 */
    private Integer shopCount;



    private Double monthlyCompletionRate;//本月完成率
private Double monthlyProgress;:11本月进度
private Double monthlySales;// 本月销售额
private Double monthlySalesYoy;// 本月销售额同比
private Double monthlySalesChain;//本月销售额环比
private Double monthlySalesTarget;//月销售目标
private Double:quarterlyCompletionRate;//李度完成率
private Double quarterlyProgress;// 李度进度
private Double salesTargetQuarterly;// 李销售目标
private Double quarterlySales;//李度销售额
private Double quarterlySalesYoy;// 李度销售额同比
private Double quarterlySalesChain;// 李度销售额环比
private Double yearCompletionRate;//年度完成率
private Double yearProgress;// 年度进度
private Double yearSales;//年度销售额
private Double yearSalesChain;// 年度销售额环比
private Double yearSalesYoy;// 年度销售额同比private Double salesTargetYear;//年销售目标


public class BiDyYMQCrowdSaleType {

    /** 人群总数 */
    @Excel(name = "人群总数")
    private Integer targetAudienceTotalCount;
    private Double targetAudienceTotalCountChain;//环比

    //人群趋势
<String,Integer> crowdTrend;

    //人群净值
    private Integer netCrowd;
    private Double netCrowdChain;//环比

    //人群净值趋势
    private Map<String,Integer> netCrowdTrend;

    /** 新增人数 */
    @Excel(name = "新增人数")
    private Integer addCrowdBrand;

    /** 流失人数 */
    @Excel(name = "流失人数")
    private Integer loseCrowdBrand;

    /** 支付老买家数 */
    @Excel(name = "支付老买家数")
    private Integer oldPaidCustomers;
    private Double oldPaidCustomersChain;//环比

    /** 支付新买家数 */
    @Excel(name = "支付新买家数")
    private Integer newPaidCustomers;
    private Double newPaidCustomersChain;//环比

    /** 客单价 */
    @Excel(name = "客单价")
    private Double customerUnitPrice;
    private Double customerUnitPriceChain;//环比
    //客单价趋势
    private Map<String,Double> customerUnitPriceTrend;

    /** 老客客单价 */
    @Excel(name = "老客客单价")
    private Double oldCustomerUnitPrice;
    private Double oldCustomerUnitPriceChain;//环比

    /** 新客客单价 */
    @Excel(name = "新客客单价")
    private Double newCustomerUnitPrice;
    private Double newCustomerUnitPriceChain;//环比

    /** 自营销售额 */
    @Excel(name = "自营销售额")
    private Double selfOperatedSalesAmount;
    private Double selfOperatedSalesAmountChain;//环比

    //自营销售额趋势
    private Map<String,Double> selfOperatedSalesAmountTrend;

    /** 自营直播销售额 */
    @Excel(name = "自营直播销售额")
    private Double selfOperatedLiveSalesAmount;
    private Double selfOperatedLiveSalesAmountChain;//环比

    /** 自营短视频销售额 */
    @Excel(name = "自营短视频销售额")
    private Double selfOperatedVideoSalesAmount;
    private Double selfOperatedVideoSalesAmountChain;//环比

    /** 自营商品卡销售额 */
    @Excel(name = "自营商品卡销售额")
    private Double selfOperatedProductCardSalesAmount;
    private Double selfOperatedProductCardSalesAmountChain;//环比

    /** 自营其他（搜索）销售额 */
    @Excel(name = "自营其他（搜索）销售额")
    private Double selfOperatedOtherSalesAmount;
    private Double selfOperatedOtherSalesAmountChain;//环比

    /** 达人合作销售额 */
    @Excel(name = "达人合作销售额")
    private Double influencerCooperationSalesAmount;
    private Double influencerCooperationSalesAmountChain;//环比

    //达人合作销售额趋势
    private Map<String,Double> influencerCooperationSalesAmountTrend;

    /** 达人直播销售额 */
    @Excel(name = "达人直播销售额")
    private Double influencerLiveSalesAmount;
    private Double influencerLiveSalesAmountChain;//环比

    /** 达人商品卡销售额 */
    @Excel(name = "达人商品卡销售额")
    private Double influencerProductCardSalesAmount;
    private Double influencerProductCardSalesAmountChain;//环比

    /** 达人其他（搜索）销售额 */
    @Excel(name = "达人其他（搜索）销售额")
    private Double influencerOtherSalesAmount;
    private Double influencerOtherSalesAmountChain;//环比

    /** 达人短视频销售额 */
    @Excel(name = "达人短视频销售额")
    private Double influencerVideoSalesAmount;
    private Double influencerVideoSalesAmountChain;//环比

}


/** 自营直播销售额 */
@Excel(name ="自营直播销售额")
private Double selfOperatedLiveSalesAmount;
** 自营短视频销售额 */
@Excel(name ="自营短视频销售额")
private Double selfoperatedVideoSalesAmount;
/** 自营商品卡销售额 */
@Excel(name ="自营商品卡销售额")
private Double self0peratedProductCardSalesAmount;
/** 自营其他(搜索)销售额 */
@Excel(name =“自营其他(搜索)销售额")private Double selfoperated0therSalesAmount;
/** 达人直播销售额 *!@Excel(name ="达人直播销售额")
private Double inflvencerLiveSalesAmount;
/** 达人商品卡销售额 *
@Excel(name ="达人商品卡销售额")
private Double inflvencerProductCardSalesAmount;
/** 达人其他(搜索)销售额 */@Excel(name ="达人其他(搜索)销售额")private Double influencerOtherSalesAmount;
/** 达人短视频销售额 *
0Excel(name ="达人短视频销售额"
private Double influencerVideoSalesAmount;


/** 自营销售额 *@Excel(name =“自营销售额")private Double selfoperatedSalesAmount;
/** 自营退款金额 */@Excel(name ="自营退款金额")private Double selfoperatedReturnAmount;
/** 自营成交订单数 */@Excel(name =“自营成交订单数")private Integer selfOperatedOrderCount;
/** 店铺商品访客数 */@Excel(name =“店铺商品访客数")private Integer shopProductVisitorCount;
/** 自营成交人数 */
@Excel(name ="自营成交人数")private Integer selfOperatedBuyerCount;


"selfOperatedSalesAmount": 4000.0,
        "selfOperatedSalesCount": null,
        "selfOperatedReturnAmount": 320.0,
        "selfOperatedRefundRate": 0.08,
        "selfOperatedOrderCount": 2000,
        "shopProductVisitorCount": 420,
        "selfOperatedProductClickCount": 800,
        "selfOperatedProductClickConversionRate": null,
        "selfOperatedBuyerCount": 4000,
        "selfOperatedCustomerUnitPrice": 1.0,
        "selfOperatedLiveSalesAmount": 4000.0,
        "selfOperatedLiveOrderCount": 8000,
        "selfOperatedLiveReturnAmount": 400.0,
        "selfOperatedVideoSalesAmount": 1200.0,
        "selfOperatedVideoOrderCount": 1600,
        "selfOperatedVideoReturnAmount": 2000.0,
        "selfOperatedProductCardSalesAmount": 4000.0,
        "selfOperatedProductCardOrderCount": 6000,
        "selfOperatedProductCardReturnAmount": 8000.0,
        "selfOperatedOtherSalesAmount": 12000.0,
        "selfOperatedOtherOrderCount": 16000,
        "selfOperatedOtherReturnAmount": 20000.0,


        /** 直播时长 */
@Excel(name = "直播时长")
private String liveDuration;

/** 人均观看时长 */
@Excel(name = "人均观看时长")
private String avgWatchDuration;

/** 直播间曝光次数 */
@Excel(name = "直播间曝光次数")
private Integer roomExposureCount;

/** 直播间观看次数 */
@Excel(name = "直播间观看次数")
private Integer roomWatchCount;

/** 直播间曝光-观看率(次数) */
@Excel(name = "直播间曝光-观看率(次数)")
private Double roomExposureToWatchRate;


/** 直播间互动次数 */
@Excel(name = "直播间互动次数")
private Integer roomInteractionCount;

/** 直播间观看-互动率(次数) */
@Excel(name = "直播间观看-互动率(次数)")
private Double roomWatchToInteractionRate;

 "roomExposureCount": 1205694,
        "roomWatchCount": 131610,
        "roomExposureToWatchRate": 0.11,
        "roomInteractionCount": null,
        "roomWatchToInteractionRate": null,
        "newFollowersCount": null,
        "productExposureCount": 921267,
        "productClickCount": 79176,
        "productExposureToClickRate": 0.09,
        "productClickToOrderRate": 0.0,
        "completedOrdersCount": 3096,
        "uniqueBuyersCount": null,
        "totalTransactionAmount": null,
        "soldItemsCount": 3096,
        "gmvPerThousandViews": 11453.21,
        "averageOrderValue": null,
        "cpcThousandViews": null,
        "payConversionRate": null,
        "viewProductExposureRate": 7.0,

/** 新增粉丝数 */
@Excel(name = "新增粉丝数")
private Integer newFollowersCount;

/** 商品曝光次数 */
@Excel(name = "商品曝光次数")
private Integer productExposureCount;

/** 商品点击次数 */
@Excel(name = "商品点击次数")
private Integer productClickCount;

/** 商品曝光-点击率(次数) */
@Excel(name = "商品曝光-点击率(次数)")
private Double productExposureToClickRate;

/** 商品点击-成交率(次数) */
@Excel(name = "商品点击-成交率(次数)")
private Double productClickToOrderRate;

/** 成交订单数 */
@Excel(name = "成交订单数")
private Integer completedOrdersCount;

/** 成交人数 */
@Excel(name = "成交人数")
private Integer uniqueBuyersCount;

/** 成交金额 */
@Excel(name = "成交金额")
private Double totalTransactionAmount;

/** 成交件数 */
@Excel(name = "成交件数")
private Integer soldItemsCount;

/** 千次观看成交金额 */
@Excel(name = "千次观看成交金额")
private Double gmvPerThousandViews;

/** 客单价 */
@Excel(name = "客单价")
private Double averageOrderValue;

/** 千次消耗 */
@Excel(name = "千次消耗")
private Double cpcThousandViews;

//支付转化率
private Double payConversionRate;

//观看商品曝光率
private Double viewProductExposureRate;

//时间单位
private String dataDateUnit;



直播间暖光次数
12.66万
同比:-38.56%
直播问观看次数
6.66万
同比:-38.569
直播间成交订单数 3.66万
光.观看率23.0696
支付转化率28.096

商品曝光次数
12.66万
同比:-38.56%
商品点击次数
6.66万
同比:-38.56
商品成交件数 3.66万
光点击率
52 696
品点击·成交率28.日%